home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / RIncludes / Controls.r < prev    next >
Encoding:
Text File  |  2000-04-12  |  9.5 KB  |  232 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Controls.r
  3.  
  4.      Contains:    Control Manager interfaces
  5.  
  6.      Version:    Technology:    Mac OS 9
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    © 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17.  
  18. #ifndef __CONTROLS_R__
  19. #define __CONTROLS_R__
  20.  
  21. #ifndef __CONDITIONALMACROS_R__
  22. #include "ConditionalMacros.r"
  23. #endif
  24.  
  25. #define kControlNoVariant                 0                    /*  No variant */
  26. #define kControlUsesOwningWindowsFontVariant  0x08            /*  Control uses owning windows font to display text */
  27.  
  28. #define kControlNoPart                     0
  29. #define kControlIndicatorPart             129
  30. #define kControlDisabledPart             254
  31. #define kControlInactivePart             255
  32.  
  33. #define kControlEntireControl             0
  34. #define kControlStructureMetaPart         (-1)
  35. #define kControlContentMetaPart         (-2)
  36.  
  37. #define kControlFocusNoPart             0                    /*  tells control to clear its focus */
  38. #define kControlFocusNextPart             (-1)                /*  tells control to focus on the next part */
  39. #define kControlFocusPrevPart             (-2)                /*  tells control to focus on the previous part */
  40.  
  41. #define kControlCollectionTagBounds     'boun'                /*  Rect - the bounding rectangle */
  42. #define kControlCollectionTagValue         'valu'                /*  SInt32 - the value */
  43. #define kControlCollectionTagMinimum     'min '                /*  SInt32 - the minimum */
  44. #define kControlCollectionTagMaximum     'max '                /*  SInt32 - the maximum */
  45. #define kControlCollectionTagViewSize     'view'                /*  SInt32 - the view size */
  46. #define kControlCollectionTagVisibility  'visi'                /*  Boolean - the visible state */
  47. #define kControlCollectionTagRefCon     'refc'                /*  SInt32 - the refCon */
  48. #define kControlCollectionTagTitle         'titl'                /*  arbitrarily sized character array - the title */
  49.  
  50. #define kControlCollectionTagSubControls  'subc'            /*  data for all of a control's subcontrols */
  51. #define kControlContentTextOnly         0
  52. #define kControlNoContent                 0
  53. #define kControlContentIconSuiteRes     1
  54. #define kControlContentCIconRes         2
  55. #define kControlContentPictRes             3
  56. #define kControlContentICONRes             4
  57. #define kControlContentIconSuiteHandle     129
  58. #define kControlContentCIconHandle         130
  59. #define kControlContentPictHandle         131
  60. #define kControlContentIconRef             132
  61. #define kControlContentICON             133
  62.  
  63. #define kControlKeyScriptBehaviorAllowAnyScript  'any '        /*  leaves the current keyboard alone and allows user to change the keyboard. */
  64. #define kControlKeyScriptBehaviorPrefersRoman  'prmn'        /*  switches the keyboard to roman, but allows them to change it as desired. */
  65. #define kControlKeyScriptBehaviorRequiresRoman  'rrmn'        /*  switches the keyboard to roman and prevents the user from changing it. */
  66.  
  67. #define kControlFontBigSystemFont         (-1)                /*  force to big system font */
  68. #define kControlFontSmallSystemFont     (-2)                /*  force to small system font */
  69. #define kControlFontSmallBoldSystemFont  (-3)                /*  force to small bold system font */
  70. #define kControlFontViewSystemFont         (-4)                /*  force to views system font (DataBrowser control only) */
  71.  
  72. #define kControlUseFontMask             0x0001
  73. #define kControlUseFaceMask             0x0002
  74. #define kControlUseSizeMask             0x0004
  75. #define kControlUseForeColorMask         0x0008
  76. #define kControlUseBackColorMask         0x0010
  77. #define kControlUseModeMask             0x0020
  78. #define kControlUseJustMask             0x0040
  79. #define kControlUseAllMask                 0x00FF
  80. #define kControlAddFontSizeMask         0x0100
  81.  
  82. #define kControlAddToMetaFontMask         0x0200                /*  Available in Appearance 1.1 or later */
  83. #define kDoNotActivateAndIgnoreClick     0                    /*  probably never used. here for completeness. */
  84. #define kDoNotActivateAndHandleClick     1                    /*  let the control handle the click while the window is still in the background. */
  85. #define kActivateAndIgnoreClick         2                    /*  control doesn't want to respond directly to the click, but window should still be brought forward. */
  86. #define kActivateAndHandleClick         3                    /*  control wants to respond to the click, but only after the window has been activated. */
  87.  
  88. #define kControlFontStyleTag             'font'
  89. #define kControlKeyFilterTag             'fltr'
  90.  
  91.                                                             /*  Control feature bits - returned by GetControlFeatures  */
  92. #define kControlSupportsGhosting         0x01
  93. #define kControlSupportsEmbedding         0x02
  94. #define kControlSupportsFocus             0x04
  95. #define kControlWantsIdle                 0x08
  96. #define kControlWantsActivate             0x10
  97. #define kControlHandlesTracking         0x20
  98. #define kControlSupportsDataAccess         0x40
  99. #define kControlHasSpecialBackground     0x80
  100. #define kControlGetsFocusOnClick         0x0100
  101. #define kControlSupportsCalcBestRect     0x0200
  102. #define kControlSupportsLiveFeedback     0x0400
  103. #define kControlHasRadioBehavior         0x0800                /*  Available in Appearance 1.0.1 or later */
  104. #define kControlSupportsDragAndDrop     0x1000                /*  Available in Carbon */
  105. #define kControlAutoToggles             0x4000                /*  Available in Appearance 1.1 or later */
  106. #define kControlSupportsGetRegion         0x00020000            /*  Available in Appearance 1.1 or later */
  107. #define kControlSupportsFlattening         0x00080000            /*  Available in Carbon */
  108. #define kControlSupportsSetCursor         0x00100000            /*  Available in Carbon */
  109. #define kControlSupportsContextualMenus  0x00200000            /*  Available in Carbon */
  110. #define kControlSupportsClickActivation  0x00400000            /*  Available in Carbon */
  111.  
  112. #define drawCntl                         0
  113. #define testCntl                         1
  114. #define calcCRgns                         2
  115. #define initCntl                         3
  116. #define dispCntl                         4
  117. #define posCntl                         5
  118. #define thumbCntl                         6
  119. #define dragCntl                         7
  120. #define autoTrack                         8
  121. #define calcCntlRgn                     10
  122. #define calcThumbRgn                     11
  123. #define drawThumbOutline                 12
  124. #define kControlMsgDrawGhost             13
  125. #define kControlMsgCalcBestRect         14                    /*  Calculate best fitting rectangle for control */
  126. #define kControlMsgHandleTracking         15
  127. #define kControlMsgFocus                 16                    /*  param indicates action. */
  128. #define kControlMsgKeyDown                 17
  129. #define kControlMsgIdle                 18
  130. #define kControlMsgGetFeatures             19
  131. #define kControlMsgSetData                 20
  132. #define kControlMsgGetData                 21
  133. #define kControlMsgActivate             22
  134. #define kControlMsgSetUpBackground         23
  135. #define kControlMsgCalcValueFromPos     26
  136. #define kControlMsgTestNewMsgSupport     27                    /*  See if this control supports new messaging */
  137. #define kControlMsgSubValueChanged         25                    /*  Available in Appearance 1.0.1 or later */
  138. #define kControlMsgSubControlAdded         28                    /*  Available in Appearance 1.0.1 or later */
  139. #define kControlMsgSubControlRemoved     29                    /*  Available in Appearance 1.0.1 or later */
  140. #define kControlMsgApplyTextColor         30                    /*  Available in Appearance 1.1 or later */
  141. #define kControlMsgGetRegion             31                    /*  Available in Appearance 1.1 or later */
  142. #define kControlMsgFlatten                 32                    /*  Available in Carbon. Param is Collection. */
  143. #define kControlMsgSetCursor             33                    /*  Available in Carbon. Param is ControlSetCursorRec */
  144. #define kControlMsgDragEnter             38                    /*  Available in Carbon. Param is DragRef, result is boolean indicating acceptibility of drag. */
  145. #define kControlMsgDragLeave             39                    /*  Available in Carbon. As above. */
  146. #define kControlMsgDragWithin             40                    /*  Available in Carbon. As above. */
  147. #define kControlMsgDragReceive             41                    /*  Available in Carbon. Param is DragRef, result is OSStatus indicating success/failure. */
  148. #define kControlMsgDisplayDebugInfo     46                    /*  Available in Carbon on X. */
  149. #define kControlMsgContextualMenuClick     47                    /*  Available in Carbon. Param is ControlContextualMenuClickRec */
  150. #define kControlMsgGetClickActivation     48                    /*  Available in Carbon. Param is ControlClickActivationRec */
  151.  
  152. #define kDrawControlEntireControl         0
  153. #define kDrawControlIndicatorOnly         129
  154.  
  155. #define kDragControlEntireControl         0
  156. #define kDragControlIndicator             1
  157.  
  158. #define kControlSupportsNewMessages     ' ok '
  159. #define kControlKeyFilterBlockKey         0
  160. #define kControlKeyFilterPassKey         1
  161.  
  162.  
  163. /*--------------------------cctb • Control Color old Lookup Table----------------------*/
  164. #ifdef oldTemp
  165.     type 'cctb' {
  166.             unsigned hex longint;                                    /* CCSeed                */
  167.             integer;                                                /* ccReserved            */
  168.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  169.             wide array ColorSpec {
  170.                     integer        cFrameColor,                        /* partcode                */
  171.                                 cBodyColor,
  172.                                 cTextColor,
  173.                                 cElevatorColor;
  174.                     unsigned integer;                                /* RGB:    red                */
  175.                     unsigned integer;                                /*        green            */
  176.                     unsigned integer;                                /*        blue            */
  177.             };
  178.     };
  179. #else
  180.     type 'cctb' {
  181.             unsigned hex longint = 0;                                /* CCSeed                */
  182.             integer = 0;                                            /* ccReserved            */
  183.             integer = $$Countof(ColorSpec) - 1;                        /* ctSize                */
  184.             wide array ColorSpec {
  185.                     integer        cFrameColor,                        /* partcode                */
  186.                                 cBodyColor,
  187.                                 cTextColor,
  188.                                 cElevatorColor,
  189.                                 cFillPatColor,
  190.                                 cArrowsLight,
  191.                                 cArrowsDark,
  192.                                 cThumbLight,
  193.                                 cThumbDark,
  194.                                 cHiliteLight,
  195.                                 cHiliteDark,
  196.                                 cTitleBarLight,
  197.                                 cTitleBarDark,
  198.                                 cTingeLight,
  199.                                 cTingeDark;
  200.                     unsigned integer;                                /* RGB:    red                */
  201.                     unsigned integer;                                /*        green            */
  202.                     unsigned integer;                                /*        blue            */
  203.             };
  204.     };
  205. #endif
  206.  
  207.  
  208. /*----------------------------CNTL • Control Template-----------------------------------*/
  209. type 'CNTL' {
  210.         rect;                                                    /* Bounds                */
  211.         integer;                                                /* Value                */
  212.         byte            invisible, visible;                     /* visible                */
  213.         fill byte;
  214.         integer;                                                /* Max                    */
  215.         integer;                                                /* Min                    */
  216.         integer         pushButProc,                            /* ProcID                */
  217.                         checkBoxProc,
  218.                         radioButProc,
  219.                         pushButProcUseWFont = 8,
  220.                         checkBoxProcUseWFont,
  221.                         radioButProcUseWFont,
  222.                         scrollBarProc = 16;
  223.         longint;                                                /* RefCon                */
  224.         pstring;                                                /* Title                */
  225. };
  226.  
  227. #define    popupMenuCDEFproc        1008                            /* ProcID 1008 = 16 * 63        */
  228.  
  229.  
  230. #endif /* __CONTROLS_R__ */
  231.  
  232.